package com.flycms.core.entity;

import java.io.Serializable;

import javax.validation.constraints.Min;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 分页请求参数实体类
 *
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PagingParam implements Serializable {

    private static final long serialVersionUID = 1L;

    //排序的字段，注意防注入
    private String orderBy;
    
    //排序方式，注意防注入
    private String order;
    
    @Min(value = 1, message = "pageSize必须大于等于1")
    private Integer pageSize;
    
    @Min(value = 0, message = "pageIndex必须大于等于0")
    private Integer pageIndex;
    
    private Integer rows;
    
    private Integer offset;
    
}
